<?php
error_reporting(4);
if(!$_SESSION['memberID']){exit("<script>window.location='dlogin.html'</script>");}
include("../../com.inc.php");
$url=$_REQUEST["url"];
$dcode=$_REQUEST["dcode"];
if(isset($_REQUEST["dcode"])){
	$sel="select id from pft_member where dcode='".$dcode."' limit 1";
	$GLOBALS['le']->query($sel);
	$GLOBALS['le']->fetch_assoc();
	if(!$dcode){
		exit("请输入接口编号");
	}
	elseif($GLOBALS['le']->f("id")!=$_SESSION['memberID']){
		exit("接口编号错误");
	}
}
$url=explode("?",$url);
if(!$url){
	exit("请输入回调地址");
}
elseif(count($url)>1){
	exit("请输入不带参数的回调地址");
}
else{	
	// $res=file_get_contents($url[0]);
	// if($res!="success"){
		// exit("回调地址未返回正确的成功信息");
	// }
	// else{
		// echo "ok";
	// }
    if($url[0]){
        $res=file_get_contents($url[0]);
        if($res!="success"){
            exit("回调地址未返回正确的成功信息");
        }
        else{
            echo "ok";
        }
    }else{
        echo "ok";
    }
}
?>